Add two patches to fix general compile issues. The first masks out some
glibc specific extensions if using a different libc.
The second fixes a compile issue with newer compilers.
Like this it's possible to easily add more executables to the packages
should the need (or wish) arise. This also gets rid of the following
warnings:
cc1: note: someone does not honour COPTS correctly, passed 2 times
Signed-off-by: Sebastian Kemper <[email protected]>
CONFIGURE_ARGS+=--disable-silent-rules
-define Build/Compile
- $(MAKE) -C $(PKG_BUILD_DIR) \
- HOSTCC="$(HOSTCC)" \
- CROSS_COMPILE="$(TARGET_CROSS)" \
- CFLAGS="$(TARGET_CFLAGS)" \
- CPPFLAGS="$(TARGET_CPPFLAGS)" \
- dahdi_cfg dahdi_monitor dahdi_scan dahdi_speed dahdi_test fxotune
-endef
-
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/.libs/*.so* $(1)/usr/lib/
--- /dev/null
+--- a/xpp/xtalk/debug.c
++++ b/xpp/xtalk/debug.c
+@@ -26,7 +26,9 @@
+ #include <stdlib.h>
+ #include <stdarg.h>
+ #include <syslog.h>
++#ifdef __GLIBC__
+ #include <execinfo.h>
++#endif
+ #include <xtalk/debug.h>
+ #include <autoconfig.h>
+
+@@ -61,6 +63,7 @@ void dump_packet(int loglevel, int mask,
+ /* from glibc info(1) */
+ void print_backtrace(FILE *fp)
+ {
++#ifdef __GLIBC__
+ void *array[10];
+ size_t size;
+ char **strings;
+@@ -71,4 +74,5 @@ void print_backtrace(FILE *fp)
+ for (i = 0; i < size; i++)
+ fprintf(fp, "%s\n", strings[i]);
+ free(strings);
++#endif
+ }
--- /dev/null
+--- a/xpp/echo_loader.c
++++ b/xpp/echo_loader.c
+@@ -564,7 +564,7 @@ UINT32 Oct6100UserDriverReadBurstApi(tPO
+ return cOCT6100_ERR_OK;
+ }
+
+-inline int get_ver(struct astribank *astribank)
++static inline int get_ver(struct astribank *astribank)
+ {
+ return spi_send(astribank, 0, 0, 1, 1);
+ }